package com.wynn.serviceFeign;

import com.wynn.pojo.Order;
import com.wynn.pojo.OrderException;
import com.wynn.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient("serviceProviderBase")
public interface OrderClient {


    @GetMapping("order/statisticExc")
    Result statisticExc();

    @GetMapping("order/statisticDone")
    Result statisticDone();

    @GetMapping("order/getChartData2")
    Result getChartData2();
    @GetMapping("order/statisticNum")
    Result statisticOrder();

    @GetMapping("order/selectAll")
    List<Order> selectAll();

    @GetMapping("order/searchAll")
    List<Order> searchAll(@RequestParam(value = "deadLine") String deadLine, @RequestParam(value = "company")String company, @RequestParam(value = "product")Integer product);

    @GetMapping("order/deleteOrder")
    void deleteOrder(@RequestParam(value = "id")int id);

    @PostMapping("order/addOrder")
    void addOrder(Order order);

    @PostMapping("order/editOrder")
    void editOrder(Order order);

    @PostMapping("order/addOrderException")
    boolean addOrderException(Map<String, String> orderException);

    @PostMapping("order/submit")
    void submit(Order order);

    @PostMapping("order/searchException")
    List<OrderException> searchException(Map<String, String> map);

    @PostMapping("order/editException")
    void editException(OrderException orderException);

    @GetMapping("order/recoverException")
    void recoverException(@RequestParam(value = "id") int id, @RequestParam(value = "orderId") int orderId);
}
